package com.example.demo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.pojo.Relationship;

import java.util.List;

public interface Rservice extends IService<Relationship> {

    List<Relationship> listByPersonId(Long personId);

    List<Relationship> listByRelationType(String relationType);

    Page<Relationship> pageRelations(Page<Relationship> page,
                                     Long personId,
                                     String relationType);


    boolean batchCreateRelations(List<Relationship> relationships);

    boolean existsRelation(Long personId, Long relatedPersonId, String relationType);
}